﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QWebSocket>
#include <QWebSocketServer>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QTimer>

struct webClientlist{
    QWebSocket *webclient;
    QString param;
    QString name;
    int nCount;
};

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void devListSort(QList<webClientlist*>  list);
    QWebSocketServer    *m_webSvr;
    QList<webClientlist*>  m_list;
    //
    QString m_szLog;
    //
    QTimer  m_timer;
private slots:
    void onNewConnection();
    void processTextMessage(QString message);
    void socketDisconnected();
    void closed();

private:
private slots:
    void slotTimerOut();
    void on_pushButton_clicked();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
